package com.chainyoung.common.appcommon.hdwallet;

import static com.chainyoung.common.constant.LibConstant.BASE_URL;

public class WalletServerConstant {

    private static final String token = "3MV91B7173U9XVYQAYG8FJQJCMA7WID2U8";//以太网 api key

    public static final int CHAIN_ID = 1;//主网ID
    //public static final int CHAIN_ID=4;

    private static final String ETH_BASE_URL = "http://api.etherscan.io/api?";
    //private static final String ETH_BASE_URL = "http://api-rinkeby.etherscan.io/api?";

    public static final String GET_SINGLE_BALANCE = ETH_BASE_URL + "module=account&action=balance&tag=latest&apikey=" + token;//获取单个钱包余额

    public static final String GET_MULTI_BALANCE = ETH_BASE_URL + "module=account&action=balancemulti&tag=latest&apikey=" + token;

    public static final String GET_ALL_NORMAL_TRANSACTION = ETH_BASE_URL + "module=account&action=txlist&startblock=0&endblock=99999999&sort=desc&apikey=" + token;

    public static final String GET_NORMAL_TRANSACTION_BY_PAGE = ETH_BASE_URL + "module=account&action=txlist&startblock=0&endblock=99999999&sort=asc&apikey=" + token;

    public static final String SEND_TRANSACTION = ETH_BASE_URL + "module=proxy&action=eth_sendRawTransaction&&apikey=" + token;

    public static final String GET_TRANSACTION_COUNT = ETH_BASE_URL + "module=proxy&action=eth_getTransactionCount&tag=pending&apikey=" + token;

    public static final String GET_GAS_LIMIT_ESTIMATE = ETH_BASE_URL + "module=proxy&action=eth_estimateGas&value=0xff22&gasPrice=0x051da038cc&gas=0xffffff&apikey=" + token;


    public static final String GET_GAS_PRICE = ETH_BASE_URL + "module=proxy&action=eth_gasPrice&apikey=" + token;

    public static final String GET_ETH_PRICE = ETH_BASE_URL + "module=stats&action=ethprice&apikey=" + token;

    public static final String GET_RATE = BASE_URL + "Tool/getExchangeRate";

    public static final String GET_TRANSACTION_BY_HASH = ETH_BASE_URL + "module=proxy&action=eth_getTransactionByHash&apikey=" + token;

    public static final String GET_TRANSACTION_BY_HASH_URL = "http://etherscan.io/tx/";

    public static final String GET_ALL_TOKEN_TRANSFERS = ETH_BASE_URL + "module=account&action=tokentx&startblock=0&endblock=999999999&sort=asc&apikey=" + token;

    public static final String GET_SINGLE_TOKEN_TRANSFER = ETH_BASE_URL + "module=account&action=tokentx&sort=desc&apikey=" + token;

    public static final String GET_TOKEN_BALANCE = ETH_BASE_URL + "module=account&action=tokenbalance&tag=latest&apikey=" + token;


}
